JAVA_OPTS=-sourcepath src -d classes

all : lab3.jar

classes/uoit/csci2020u/L3/interfaces/Shape.class : src/uoit/csci2020u/L3/interfaces/Shape.java
	javac $(JAVA_OPTS) src/uoit/csci2020u/L3/interfaces/Shape.java

classes/uoit/csci2020u/L3/interfaces/Stretchable.class : src/uoit/csci2020u/L3/interfaces/Stretchable.java
	javac $(JAVA_OPTS) src/uoit/csci2020u/L3/interfaces/Stretchable.java

classes/uoit/csci2020u/L3/shapes/Sphere.class : src/uoit/csci2020u/L3/shapes/Sphere.java classes/uoit/csci2020u/L3/interfaces/Shape.class
	javac $(JAVA_OPTS) src/uoit/csci2020u/L3/shapes/Sphere.java

classes/uoit/csci2020u/L3/shapes/Baseball.class : src/uoit/csci2020u/L3/shapes/Baseball.java classes/uoit/csci2020u/L3/shapes/Sphere.class
	javac $(JAVA_OPTS) src/uoit/csci2020u/L3/shapes/Baseball.java

classes/uoit/csci2020u/L3/shapes/Balloon.class : src/uoit/csci2020u/L3/shapes/Balloon.java classes/uoit/csci2020u/L3/interfaces/Stretchable.class classes/uoit/csci2020u/L3/shapes/Sphere.class
	javac $(JAVA_OPTS) src/uoit/csci2020u/L3/shapes/Balloon.java

classes/TestSphere.class : src/TestSphere.java classes/uoit/csci2020u/L3/shapes/Sphere.class classes/uoit/csci2020u/L3/shapes/Baseball.class classes/uoit/csci2020u/L3/shapes/Balloon.class
	javac $(JAVA_OPTS) src/TestSphere.java

lab3.jar : classes/TestSphere.class
	cd classes && jar cmf ../manifest.txt ../lab3.jar *

run : lab3.jar
	java -cp lab3.jar TestSphere

clean :
	rm -rf classes/* lab3.jar
